QGrid
Area commands
|
|
| QG_SetAreaAlignment(areaRef; horzAlign; vertAlign):errorCode | |||
|
|
areaRef | Longint | QGrid area reference |
|
|
horzAlign | Longint | Horizontal alignment |
|
|
vertAlign | Longint | Vertical alignment |
|
|
error | Longint | Error result |
Configures the cell alignment inside a QGrid plug-in area.
Parameter areaRef is the QGrid area reference. If areaRef is not a valid QGrid area reference, qg_paramErr error is returned.
Parameters horzAlign and vertAlign specify how the grid cells will be aligned inside the QGrid area rectangle. Acceptable alignment values are listed below:
| qg_AlignHorzLeft | 0 | Horizontally align cells to area's left |
| qg_AlignHorzCenter | 1 | Horizontally align cells to area's center |
| qg_AlignHorzRight | 2 | Horizontally align cells to area's right |
| qg_AlignVertTop | 0 | Vertically align cells to area's top |
| qg_AlignVertCenter | 1 | Vertically align cells to area's center |
| qg_AlignVertBottom | 2 | Vertically align cells to area's bottom |
Notes
| Horizontal alignment: | qg_AlignHorzLeft |
| Vertical alignment: | qg_AlignVertTop |
Example
` center the cells inside the xGrid area C_LONGINT($err;$horz;$vert) $horz:=qg_AlignHorzCenter$vert:=qg_AlignVertCenter $err:=QG_SetAreaAlignment(xGrid;$horz;$vert)If ($err # qg_noErr) ` Handle the errorEnd if |
Related commands
| QG_GetAreaAlignment | Returns the current cell alignment inside a QGrid plug-in area |